{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "44037226",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "今天要上的课如下\n",
      "今天星期几（请输入0-6的数字）：2\n",
      "2\n",
      "今天星期3\n",
      "大学英语、创业实践\n",
      "the end\n"
     ]
    }
   ],
   "source": [
    "print(\"今天要上的课如下\")\n",
    "import datetime\n",
    "time = datetime.datetime.today().weekday()\n",
    "count = 3\n",
    "while True:\n",
    "    count -= 1\n",
    "    if count == -1:\n",
    "        print(\"连错三次，今天星期几都不知道，真是个笨蛋~\")\n",
    "    else:\n",
    "        week_time = int(input(\"今天星期几（请输入0-6的数字）：\"))\n",
    "        if week_time == int(time):\n",
    "            print(time)\n",
    "            answer = \"今天星期{}\".format((week_time)+1)\n",
    "            print(answer)\n",
    "            if week_time == 0:\n",
    "                print(\"星期一早上没课，下午有两节课\")\n",
    "                print(\"8-10Python语言\")\n",
    "                print(\"12-13大学英语\")\n",
    "\n",
    "            elif week_time == 1:\n",
    "                print(\"毛概实践、H5、定向越野、毛概理论\")\n",
    "            elif week_time == 2:\n",
    "                print(\"大学英语、创业实践\")\n",
    "            elif week_time == 3:\n",
    "                print(\"Python数据可视化\")\n",
    "            elif week_time == 4:\n",
    "                print(\"Illustrator软件应用\")\n",
    "            else:\n",
    "                print(\"快乐周末！\")\n",
    "            print(\"the end\")\n",
    "            break\n",
    "        else:\n",
    "            print(\"今天星期几都不知道吗？您还有\", count, \"次尝试的机会\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "95ad0748",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}

